package edu.vt.ece_3574.amber_alert;

import android.content.Context;
import edu.vt.ece_3574.amber_alert.accounts.Account;

/**
 * This class is used to share global variables between activities.  Information about the
 * logged in account is stored here whenever there is a successful login
 * 
 */

public class AmberAlertApplication extends android.app.Application{
	public static String preferencesFileName = "AmberAlertPreferences";
	public static String defaultInterval = "DefaultInterval";
	private Account currentAccount;
	private static AmberAlertApplication instance;
	
	public AmberAlertApplication() {
		instance = this;
	}
	
	public static AmberAlertApplication get() {
		return instance;
	}
	
	public static Context getContext() {
		return instance;
	}
	
	/**
	 * Gets account of user currently logged in
	 * @return account of user currently logged in
	 */
	public Account getCurrentAccount() {
		return currentAccount;
	}
	
	/**
	 * Saves account information of user currently logged in
	 * @param account of user currently logged in
	 */
	public void setCurrentAccount(Account account) {
		currentAccount = account;
	}
	
	/**
	 * Gets the current location
	 * @return string containing location info
	 */
}
